import request from '@/utils/request'
import { praseStrEmpty } from '@/utils/ruoyi'

/**
 * DefectType分页查询
 * @param {查询条件} data
 */
export function listBaseDefecttype(query) {
	return request({
		url: 'base/BaseDefecttype/list',
		method: 'get',
		params: query,
	})
}

/**
 * 新增DefectType
 * @param data
 */
export function addBaseDefecttype(data) {
	return request({
		url: 'base/BaseDefecttype',
		method: 'post',
		data: data,
	})
}
/**
 * 修改DefectType
 * @param data
 */
export function updateBaseDefecttype(data) {
	return request({
		url: 'base/BaseDefecttype',
		method: 'PUT',
		data: data,
	})
}
/**
 * 获取DefectType详情
 * @param {Id}
 */
export function getBaseDefecttype(id) {
	return request({
		url: 'base/BaseDefecttype/' + praseStrEmpty(id),
		method: 'get'
	})
}

/**
 * 删除DefectType
 * @param {主键} pid
 */
export function delBaseDefecttype(pid) {
	return request({
		url: 'base/BaseDefecttype/delete/' + pid,
		method: 'POST'
	})
}
